package com.sxbang.bms.service;


import com.sxbang.bms.base.result.Results;
import com.sxbang.bms.dto.UserDto;
import com.sxbang.bms.model.SysUser;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserService {
	Integer getUserByFuzzyUserName(String username);

    Results<SysUser> getUserByFuzzyUserNamePage(String username, Integer startPosition, Integer limit);

	Results<SysUser> getAllUsersByPage(Integer startPosition, Integer limit);

	Integer getAllUsers();

	Results save(SysUser user,Integer roleId);

	Results updateUser(UserDto userDto,Integer roleId);

	SysUser getUser(String username);

	SysUser getUserByPhone(String phone);

	SysUser getUserByEmail(String email);

    SysUser getUserById(Long id);

    int deleteUser(Long id);

	SysUser getUerByUsernameAndPassword(String username, String password);

	Results changePassword(String username, String oldPassword, String newPassword);

}
